﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Nollie
{
	public class CacheConfiguration
	{
		private string _databaseTableNameCache;
		private string _databaseTableNameCacheTag;
		
		public string ConnectionString
		{
			get;
			set;
		}
		public string DatabaseTableNameCache
		{
			get
			{
				if (string.IsNullOrEmpty(_databaseTableNameCache))
					return "dbo.Cache";

				return _databaseTableNameCache;
			}
			set
			{
				if (string.IsNullOrEmpty(value))
					throw new NollieException("The value cannot be null or empty.");

				_databaseTableNameCache = value;
			}
		}
		public string DatabaseTableNameCacheTag
		{
			get
			{
				if (string.IsNullOrEmpty(_databaseTableNameCacheTag))
					return "dbo.CacheTag";

				return _databaseTableNameCacheTag;
			}
			set
			{
				if (string.IsNullOrEmpty(value))
					throw new NollieException("The value cannot be null or empty.");

				_databaseTableNameCacheTag = value;
			}
		}

		public CacheConfiguration()
		{
		}
	}
}
